package com.gitee.feizns.zxw.utils.condition;

import com.baomidou.mybatisplus.mapper.Condition;
import com.baomidou.mybatisplus.mapper.Wrapper;

/**
 * @author feizns
 * @since 2019/9/9
 */
public abstract class Utils {

    public static <T> Wrapper<T> desc() {
        return Condition.create().orderBy("weight", false).orderBy("created_at", false);
    }

    public static <T> Wrapper<T> first() {
        return (Wrapper<T>) desc().last("LIMIT 1");
    }

}
